
<!DOCTYPE HTML>
<html lang="en" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>查询数据 · InfluxDB中文文档</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="jasper">
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-comment/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="downsampling_and_retention.html" />
    
    
    <link rel="prev" href="writing_data.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    
    
        
        <li>
            <a href="https://legacy.gitbook.com/book/jasper-zhang1/influxdb" target="_blank" class="custom-link">InfluxDB中文文档</a>
        </li>
    
    

    
    <li class="divider"></li>
    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    前言
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../Introduction/">
            
                <a href="../Introduction/">
            
                    
                    介绍
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="../Introduction/installation.html">
            
                <a href="../Introduction/installation.html">
            
                    
                    安装
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="../Introduction/getting_start.html">
            
                <a href="../Introduction/getting_start.html">
            
                    
                    入门指南
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="./">
            
                <a href="./">
            
                    
                    使用指南
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="writing_data.html">
            
                <a href="writing_data.html">
            
                    
                    写入数据
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.3.2" data-path="querying_data.html">
            
                <a href="querying_data.html">
            
                    
                    查询数据
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="downsampling_and_retention.html">
            
                <a href="downsampling_and_retention.html">
            
                    
                    采样和数据保留
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4" data-path="hardware_sizing.html">
            
                <a href="hardware_sizing.html">
            
                    
                    硬件指南
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.5" data-path="https_setup.html">
            
                <a href="https_setup.html">
            
                    
                    HTTPS设置
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../Concepts/">
            
                <a href="../Concepts/">
            
                    
                    概念介绍
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../Concepts/key_concepts.html">
            
                <a href="../Concepts/key_concepts.html">
            
                    
                    关键概念
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="../Concepts/glossary.html">
            
                <a href="../Concepts/glossary.html">
            
                    
                    专业术语
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="../Concepts/crosswalk.html">
            
                <a href="../Concepts/crosswalk.html">
            
                    
                    与SQL比较
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.4" data-path="../Concepts/insights_tradeoffs.html">
            
                <a href="../Concepts/insights_tradeoffs.html">
            
                    
                    InfluxDB的设计见解和权衡
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5" data-path="../Concepts/schema_and_data_layout.html">
            
                <a href="../Concepts/schema_and_data_layout.html">
            
                    
                    schema设计
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.6" data-path="../Concepts/storage_engine.html">
            
                <a href="../Concepts/storage_engine.html">
            
                    
                    存储引擎
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="../Write_protocols/">
            
                <a href="../Write_protocols/">
            
                    
                    写入协议
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="../Write_protocols/line_protocol.html">
            
                <a href="../Write_protocols/line_protocol.html">
            
                    
                    行协议
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="../Query_language/">
            
                <a href="../Query_language/">
            
                    
                    查询语言
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="../Query_language/data_exploration.html">
            
                <a href="../Query_language/data_exploration.html">
            
                    
                    数据查询语法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" data-path="../Query_language/schema_exploration.html">
            
                <a href="../Query_language/schema_exploration.html">
            
                    
                    schema查询语法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.3" data-path="../Query_language/database_management.html">
            
                <a href="../Query_language/database_management.html">
            
                    
                    数据库管理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.4" data-path="../Query_language/continuous_queries.html">
            
                <a href="../Query_language/continuous_queries.html">
            
                    
                    连续查询
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.5" data-path="../Query_language/functions.html">
            
                <a href="../Query_language/functions.html">
            
                    
                    函数
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.6" data-path="../Query_language/math_operators.html">
            
                <a href="../Query_language/math_operators.html">
            
                    
                    数学运算符
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.7" data-path="../Query_language/authentication_and_authorization.html">
            
                <a href="../Query_language/authentication_and_authorization.html">
            
                    
                    认证和授权
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="../Troubleshooting/">
            
                <a href="../Troubleshooting/">
            
                    
                    故障排除
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" data-path="../Troubleshooting/faq.html">
            
                <a href="../Troubleshooting/faq.html">
            
                    
                    FAQ
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2" data-path="../Troubleshooting/system_monitor.html">
            
                <a href="../Troubleshooting/system_monitor.html">
            
                    
                    系统监控
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3" data-path="../Troubleshooting/query_management.html">
            
                <a href="../Troubleshooting/query_management.html">
            
                    
                    查询管理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.4" data-path="../Troubleshooting/error_messages.html">
            
                <a href="../Troubleshooting/error_messages.html">
            
                    
                    错误信息
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >查询数据</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="&#x67E5;&#x8BE2;&#x6570;&#x636E;">&#x67E5;&#x8BE2;&#x6570;&#x636E;</h1>
<h2 id="&#x4F7F;&#x7528;http&#x63A5;&#x53E3;&#x67E5;&#x8BE2;&#x6570;&#x636E;">&#x4F7F;&#x7528;HTTP&#x63A5;&#x53E3;&#x67E5;&#x8BE2;&#x6570;&#x636E;</h2>
<p>HTTP&#x63A5;&#x53E3;&#x662F;InfluxDB&#x67E5;&#x8BE2;&#x6570;&#x636E;&#x7684;&#x4E3B;&#x8981;&#x65B9;&#x5F0F;&#x3002;&#x901A;&#x8FC7;&#x53D1;&#x9001;&#x4E00;&#x4E2A;<code>GET</code>&#x8BF7;&#x6C42;&#x5230;<code>/query</code>&#x8DEF;&#x5F84;&#xFF0C;&#x5E76;&#x8BBE;&#x7F6E;URL&#x7684;<code>db</code>&#x53C2;&#x6570;&#x4E3A;&#x76EE;&#x6807;&#x6570;&#x636E;&#x5E93;&#xFF0C;&#x8BBE;&#x7F6E;URL&#x53C2;&#x6570;<code>q</code>&#x4E3A;&#x67E5;&#x8BE2;&#x8BED;&#x53E5;&#x3002;&#x4E0B;&#x9762;&#x7684;&#x4F8B;&#x5B50;&#x662F;&#x67E5;&#x8BE2;&#x5728;<a href="writing_data.html">&#x5199;&#x6570;&#x636E;</a>&#x91CC;&#x5199;&#x5165;&#x7684;&#x6570;&#x636E;&#x70B9;&#x3002;</p>
<pre><code>curl -G &apos;http://localhost:8086/query?pretty=true&apos; --data-urlencode &quot;db=mydb&quot; --data-urlencode &quot;q=SELECT \&quot;value\&quot; FROM \&quot;cpu_load_short\&quot; WHERE \&quot;region\&quot;=&apos;us-west&apos;&quot;
</code></pre><p>InfluxDB&#x8FD4;&#x56DE;&#x4E00;&#x4E2A;json&#x503C;&#xFF0C;&#x4F60;&#x67E5;&#x8BE2;&#x7684;&#x7ED3;&#x679C;&#x5728;<code>result</code>&#x5217;&#x8868;&#x4E2D;&#xFF0C;&#x5982;&#x679C;&#x6709;&#x9519;&#x8BEF;&#x53D1;&#x9001;&#xFF0C;InfluxDB&#x4F1A;&#x5728;<code>error</code>&#x8FD9;&#x4E2A;key&#x91CC;&#x89E3;&#x91CA;&#x9519;&#x8BEF;&#x53D1;&#x751F;&#x7684;&#x539F;&#x56E0;&#x3002;</p>
<pre><code>{
    &quot;results&quot;: [
        {
            &quot;statement_id&quot;: 0,
            &quot;series&quot;: [
                {
                    &quot;name&quot;: &quot;cpu_load_short&quot;,
                    &quot;columns&quot;: [
                        &quot;time&quot;,
                        &quot;value&quot;
                    ],
                    &quot;values&quot;: [
                        [
                            &quot;2015-01-29T21:55:43.702900257Z&quot;,
                            2
                        ],
                        [
                            &quot;2015-01-29T21:55:43.702900257Z&quot;,
                            0.55
                        ],
                        [
                            &quot;2015-06-11T20:46:02Z&quot;,
                            0.64
                        ]
                    ]
                }
            ]
        }
    ]
}
</code></pre><blockquote>
<p>&#x8BF4;&#x660E;&#xFF1A;&#x6DFB;&#x52A0;<code>pretty=ture</code>&#x53C2;&#x6570;&#x5728;URL&#x91CC;&#x9762;&#xFF0C;&#x662F;&#x4E3A;&#x4E86;&#x8BA9;&#x8FD4;&#x56DE;&#x7684;json&#x683C;&#x5F0F;&#x5316;&#x3002;&#x8FD9;&#x5728;&#x8C03;&#x8BD5;&#x6216;&#x8005;&#x662F;&#x76F4;&#x63A5;&#x7528;<code>curl</code>&#x7684;&#x65F6;&#x5019;&#x5F88;&#x6709;&#x7528;&#xFF0C;&#x4F46;&#x5728;&#x751F;&#x4EA7;&#x4E0A;&#x4E0D;&#x5EFA;&#x8BAE;&#x4F7F;&#x7528;&#xFF0C;&#x56E0;&#x4E3A;&#x8FD9;&#x6837;&#x4F1A;&#x6D88;&#x8017;&#x4E0D;&#x5FC5;&#x8981;&#x7684;&#x7F51;&#x7EDC;&#x5E26;&#x5BBD;&#x3002;</p>
</blockquote>
<h3 id="&#x591A;&#x4E2A;&#x67E5;&#x8BE2;">&#x591A;&#x4E2A;&#x67E5;&#x8BE2;</h3>
<p>&#x5728;&#x4E00;&#x6B21;API&#x8C03;&#x7528;&#x4E2D;&#x53D1;&#x9001;&#x591A;&#x4E2A;InfluxDB&#x7684;&#x67E5;&#x8BE2;&#x8BED;&#x53E5;&#xFF0C;&#x53EF;&#x4EE5;&#x7B80;&#x5355;&#x5730;&#x4F7F;&#x7528;&#x5206;&#x53F7;&#x5206;&#x9694;&#x6BCF;&#x4E2A;&#x67E5;&#x8BE2;&#xFF0C;&#x4F8B;&#x5982;&#xFF1A;</p>
<pre><code>curl -G &apos;http://localhost:8086/query?pretty=true&apos; --data-urlencode &quot;db=mydb&quot; --data-urlencode &quot;q=SELECT \&quot;value\&quot; FROM \&quot;cpu_load_short\&quot; WHERE \&quot;region\&quot;=&apos;us-west&apos;;SELECT count(\&quot;value\&quot;) FROM \&quot;cpu_load_short\&quot; WHERE \&quot;region\&quot;=&apos;us-west&apos;&quot;
</code></pre><p>&#x8FD4;&#x56DE;&#xFF1A;</p>
<pre><code>{
    &quot;results&quot;: [
        {
            &quot;statement_id&quot;: 0,
            &quot;series&quot;: [
                {
                    &quot;name&quot;: &quot;cpu_load_short&quot;,
                    &quot;columns&quot;: [
                        &quot;time&quot;,
                        &quot;value&quot;
                    ],
                    &quot;values&quot;: [
                        [
                            &quot;2015-01-29T21:55:43.702900257Z&quot;,
                            2
                        ],
                        [
                            &quot;2015-01-29T21:55:43.702900257Z&quot;,
                            0.55
                        ],
                        [
                            &quot;2015-06-11T20:46:02Z&quot;,
                            0.64
                        ]
                    ]
                }
            ]
        },
        {
            &quot;statement_id&quot;: 1,
            &quot;series&quot;: [
                {
                    &quot;name&quot;: &quot;cpu_load_short&quot;,
                    &quot;columns&quot;: [
                        &quot;time&quot;,
                        &quot;count&quot;
                    ],
                    &quot;values&quot;: [
                        [
                            &quot;1970-01-01T00:00:00Z&quot;,
                            3
                        ]
                    ]
                }
            ]
        }
    ]
}
</code></pre><h3 id="&#x67E5;&#x8BE2;&#x6570;&#x636E;&#x65F6;&#x7684;&#x5176;&#x4ED6;&#x53EF;&#x9009;&#x53C2;&#x6570;">&#x67E5;&#x8BE2;&#x6570;&#x636E;&#x65F6;&#x7684;&#x5176;&#x4ED6;&#x53EF;&#x9009;&#x53C2;&#x6570;</h3>
<h4 id="&#x65F6;&#x95F4;&#x6233;&#x683C;&#x5F0F;">&#x65F6;&#x95F4;&#x6233;&#x683C;&#x5F0F;</h4>
<p>&#x5728;InfluxDB&#x4E2D;&#x7684;&#x6240;&#x6709;&#x6570;&#x636E;&#x90FD;&#x662F;&#x5B58;&#x7684;UTC&#x65F6;&#x95F4;&#xFF0C;&#x65F6;&#x95F4;&#x6233;&#x9ED8;&#x8BA4;&#x8FD4;&#x56DE;RFC3339&#x683C;&#x5F0F;&#x7684;&#x7EB3;&#x7C73;&#x7EA7;&#x7684;UTC&#x65F6;&#x95F4;&#xFF0C;&#x4F8B;&#x5982;<code>2015-08-04T19:05:14.318570484Z</code>&#xFF0C;&#x5982;&#x679C;&#x4F60;&#x60F3;&#x8981;&#x8FD4;&#x56DE;Unix&#x683C;&#x5F0F;&#x7684;&#x65F6;&#x95F4;&#xFF0C;&#x53EF;&#x4EE5;&#x5728;&#x8BF7;&#x6C42;&#x53C2;&#x6570;&#x91CC;&#x8BBE;&#x7F6E;<code>epoch</code>&#x53C2;&#x6570;&#xFF0C;&#x5176;&#x4E2D;epoch&#x53EF;&#x4EE5;&#x662F;<code>[h,m,s,ms,u,ns]</code>&#x4E4B;&#x4E00;&#x3002;&#x4F8B;&#x5982;&#x8FD4;&#x56DE;&#x4E00;&#x4E2A;&#x79D2;&#x7EA7;&#x7684;epoch&#xFF1A;</p>
<pre><code>curl -G &apos;http://localhost:8086/query&apos; --data-urlencode &quot;db=mydb&quot; --data-urlencode &quot;epoch=s&quot; --data-urlencode &quot;q=SELECT \&quot;value\&quot; FROM \&quot;cpu_load_short\&quot; WHERE \&quot;region\&quot;=&apos;us-west&apos;&quot;
</code></pre><h4 id="&#x8BA4;&#x8BC1;">&#x8BA4;&#x8BC1;</h4>
<p>InfluxDB&#x91CC;&#x9762;&#x7684;&#x8BA4;&#x8BC1;&#x9ED8;&#x8BA4;&#x662F;&#x5173;&#x95ED;&#x7684;&#xFF0C;&#x67E5;&#x770B;<a href="">&#x8BA4;&#x8BC1;&#x548C;&#x9274;&#x6743;</a>&#x7AE0;&#x8282;&#x4E86;&#x89E3;&#x5982;&#x4F55;&#x5F00;&#x542F;&#x8BA4;&#x8BC1;&#x3002;</p>
<h4 id="&#x6700;&#x5927;&#x884C;&#x9650;&#x5236;">&#x6700;&#x5927;&#x884C;&#x9650;&#x5236;</h4>
<p>&#x53EF;&#x9009;&#x53C2;&#x6570;<code>max-row-limit</code>&#x5141;&#x8BB8;&#x4F7F;&#x7528;&#x8005;&#x9650;&#x5236;&#x8FD4;&#x56DE;&#x7ED3;&#x679C;&#x7684;&#x6570;&#x76EE;&#xFF0C;&#x4EE5;&#x4FDD;&#x62A4;InfluxDB&#x4E0D;&#x4F1A;&#x5728;&#x805A;&#x5408;&#x7ED3;&#x679C;&#x7684;&#x65F6;&#x5019;&#x5BFC;&#x81F4;&#x7684;&#x5185;&#x5B58;&#x8017;&#x5C3D;&#x3002;</p>
<p>&#x5728;1.2.0&#x548C;1.2.1&#x7248;&#x672C;&#x4E2D;&#xFF0C;InfluxDB&#x9ED8;&#x8BA4;&#x4F1A;&#x628A;&#x8FD4;&#x56DE;&#x7684;&#x6570;&#x76EE;&#x622A;&#x65AD;&#x4E3A;10000&#x6761;&#xFF0C;&#x5982;&#x679C;&#x6709;&#x8D85;&#x8FC7;10000&#x6761;&#x8FD4;&#x56DE;&#xFF0C;&#x90A3;&#x4E48;&#x8FD4;&#x56DE;&#x4F53;&#x91CC;&#x9762;&#x4F1A;&#x5305;&#x542B;&#x4E00;&#x4E2A;<code>&quot;partial&quot;:true</code>&#x7684;&#x6807;&#x8BB0;&#x3002;&#x8BE5;&#x9ED8;&#x8BA4;&#x8BBE;&#x7F6E;&#x53EF;&#x80FD;&#x4F1A;&#x5BFC;&#x81F4;Grafana&#x9762;&#x677F;&#x51FA;&#x73B0;&#x610F;&#x5916;&#x884C;&#x4E3A;&#xFF0C;&#x5982;&#x679C;&#x8FD4;&#x56DE;&#x503C;&#x5927;&#x4E8E;10000&#x65F6;&#xFF0C;&#x8FD9;&#x4E2A;&#x9762;&#x677F;&#x5C31;&#x4F1A;&#x770B;&#x5230;<a href="https://github.com/influxdata/influxdb/issues/8050" target="_blank">&#x622A;&#x65AD;/&#x90E8;&#x5206;&#x6570;&#x636E;</a>&#x3002;</p>
<p>&#x5728;1.2.2&#x7248;&#x672C;&#x4E2D;&#xFF0C;<code>max-row-limit</code>&#x53C2;&#x6570;&#x9ED8;&#x8BA4;&#x88AB;&#x8BBE;&#x7F6E;&#x4E3A;&#x4E86;0&#xFF0C;&#x8FD9;&#x8868;&#x793A;&#x8BF4;&#x5BF9;&#x4E8E;&#x8FD4;&#x56DE;&#x503C;&#x6CA1;&#x6709;&#x9650;&#x5236;&#x3002;</p>
<p>&#x8FD9;&#x4E2A;&#x6700;&#x5927;&#x884C;&#x7684;&#x9650;&#x5236;&#x4EC5;&#x4EC5;&#x4F5C;&#x7528;&#x4E8E;&#x975E;&#x5206;&#x5757;(non-chunked)&#x7684;&#x8BF7;&#x6C42;&#x4E2D;&#xFF0C;&#x5206;&#x5757;(chunked)&#x7684;&#x8BF7;&#x6C42;&#x8FD8;&#x662F;&#x8FD4;&#x56DE;&#x65E0;&#x9650;&#x5236;&#x7684;&#x6570;&#x636E;&#x3002;</p>
<h4 id="&#x5206;&#x5757;chunking">&#x5206;&#x5757;(chunking)</h4>
<p>&#x53EF;&#x4EE5;&#x8BBE;&#x7F6E;&#x53C2;&#x6570;<code>chunked=true</code>&#x5F00;&#x542F;&#x5206;&#x5757;&#xFF0C;&#x4F7F;&#x8FD4;&#x56DE;&#x7684;&#x6570;&#x636E;&#x662F;&#x6D41;&#x5F0F;&#x7684;batch&#xFF0C;&#x800C;&#x4E0D;&#x662F;&#x5355;&#x4E2A;&#x7684;&#x8FD4;&#x56DE;&#x3002;&#x8FD4;&#x56DE;&#x7ED3;&#x679C;&#x53EF;&#x4EE5;&#x6309;10000&#x6570;&#x636E;&#x70B9;&#x88AB;&#x5206;&#x5757;&#xFF0C;&#x4E3A;&#x4E86;&#x6539;&#x53D8;&#x8FD9;&#x4E2A;&#x8FD4;&#x56DE;&#x6700;&#x5927;&#x7684;&#x5206;&#x5757;&#x7684;&#x5927;&#x5C0F;&#xFF0C;&#x53EF;&#x4EE5;&#x5728;&#x67E5;&#x8BE2;&#x7684;&#x65F6;&#x5019;&#x52A0;&#x4E0A;<code>chunk_size</code>&#x53C2;&#x6570;&#xFF0C;&#x4F8B;&#x5982;&#x8FD4;&#x56DE;&#x6570;&#x636E;&#x70B9;&#x662F;&#x6BCF;20000&#x4E3A;&#x4E00;&#x4E2A;&#x6279;&#x6B21;&#x3002;</p>
<pre><code>curl -G &apos;http://localhost:8086/query&apos; --data-urlencode &quot;db=deluge&quot; --data-urlencode &quot;chunked=true&quot; --data-urlencode &quot;chunk_size=20000&quot; --data-urlencode &quot;q=SELECT * FROM liters&quot;
</code></pre><h4 id="influxql">InfluxQL</h4>
<p>&#x73B0;&#x5728;&#x4F60;&#x5DF2;&#x7ECF;&#x77E5;&#x9053;&#x4E86;&#x5982;&#x4F55;&#x67E5;&#x8BE2;&#x6570;&#x636E;&#xFF0C;&#x67E5;&#x770B;<a href="">&#x6570;&#x636E;&#x63A2;&#x7D22;&#x9875;&#x9762;</a>&#x53EF;&#x4EE5;&#x719F;&#x6089;InfluxQL&#x7684;&#x7528;&#x6CD5;&#x3002;&#x60F3;&#x8981;&#x83B7;&#x53D6;&#x66F4;&#x591A;&#x5173;&#x4E8E;&#x6570;&#x636E;&#x67E5;&#x8BE2;&#x7684;HTTP&#x63A5;&#x53E3;&#x7684;&#x7528;&#x6CD5;&#xFF0C;&#x60C5;&#x51B5;<a href="">API&#x53C2;&#x8003;&#x6587;&#x6863;</a>&#x3002;</p>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="writing_data.html" class="navigation navigation-prev " aria-label="Previous page: 写入数据">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="downsampling_and_retention.html" class="navigation navigation-next " aria-label="Next page: 采样和数据保留">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"查询数据","level":"1.3.2","depth":2,"next":{"title":"采样和数据保留","level":"1.3.3","depth":2,"path":"Guide/downsampling_and_retention.md","ref":"Guide/downsampling_and_retention.md","articles":[]},"previous":{"title":"写入数据","level":"1.3.1","depth":2,"path":"Guide/writing_data.md","ref":"Guide/writing_data.md","articles":[]},"dir":"ltr"},"config":{"plugins":["comment"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"comment":{"highlightCommented":true},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"github":"jasper-zhang/influxdb-document-cn","theme":"default","author":"jasper","pdf":{"pageNumbers":true,"fontSize":16,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"InfluxDB中文文档","language":"en","links":{"sidebar":{"InfluxDB中文文档":"https://legacy.gitbook.com/book/jasper-zhang1/influxdb"},"gitbook":true},"gitbook":"*","description":""},"file":{"path":"Guide/querying_data.md","mtime":"2019-09-29T09:05:38.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-09-29T09:10:37.143Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-comment/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

